//
//  NSDate+KY.h
//  KuaiyanCalendar
//
//  Created by 罗新 on 2017/10/17.
//  Copyright © 2017年 KuaiYan  Co.,LTD. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (KY)
/**
 获取当前月的天数
 */
+ (NSInteger)numberOfDaysInCurrentMonth;

/**
 获取当月的周数
 */
+ (NSInteger)numberOfWeeksInCurrentMonth;

/**
 获取当月1号所在的星期
 */
+ (NSInteger)firstWeekdayInCurrentMonth;

/**
 获取上个月有几天
 */
+ (NSInteger)numberOfDaysInLastMonth;

/**
 获取下个月有几天
 */
+ (NSInteger)numberOfDaysInNextMonth;


+ (NSInteger)day:(NSDate *)date;
+ (NSInteger)month:(NSDate *)date;
+ (NSInteger)year:(NSDate *)date;

+ (NSInteger)firstWeekdayInThisMonth:(NSDate *)date;
+ (NSInteger)totaldaysInMonth:(NSDate *)date;

+ (NSDate *)lastMonth:(NSDate *)date;
+ (NSDate *)nextMonth:(NSDate *)date;
+ (NSDate *)designatedMonth:(NSDate *)date count:(NSInteger)count;
+ (NSDate *)designatedDay:(NSDate *)date count:(NSInteger)count;

+ (NSDate *)creatDateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day;
+ (NSDate *)lastDay:(NSDate *)date;

+ (NSString *)currentDayString;

@end
